Learn R Programming

gridSVG (version 1.4-2)

Filter Inputs: Identifies input for a filter effect primitive.

Description

How to use and identify inputs for filter effect primitives.

Arguments

Filter Inputs

The value chosen for a filter effect primitive can be either one of six keywords or can be a string which matches a previous result attribute value within the same filter effect container. If no value is provided and this is the first filter effect primitive, then the input will be SourceGraphic. If no value is provided and this is a subsequent filter effect primitive, then this filter effect primitive will use the result from the previous filter primitive as its input.

If the value for result appears multiple times within a given filter container, then a reference to that result will use the closest preceding filter primitive with the given value for the result results. Forward references to results are an error and will not draw.

Definitions for the seven possible options:

  • SourceGraphicThis keyword represents the appearance of grobs before they are being filtered. For raster effects filter primitives, the grobs will be rasterized into an initially clear RGBA raster in image space. Pixels left untouched by the original graphic will be left clear. The image is specified to be rendered in linear RGBA pixels. The alpha channel of this image captures any anti-aliasing specified by SVG. (Since the raster is linear, the alpha channel of this image will represent the exact percent coverage of each pixel.)
  • SourceAlphaThis keyword represents the appearance of grobs before they are being filtered.SourceAlphahas all of the same rules asSourceGraphicexcept that only the alpha channel is used. The input image is an RGBA image consisting of implicitly black color values for the RGB channels, but whose alpha channel is the same asSourceGraphic. If this option is used, then some implementations might need to rasterize the graphics elements in order to extract the alpha channel.
  • BackgroundImageThis keyword represents an image snapshot of the canvas under the filter region at the time that the referring grob is being filtered.
  • BackgroundAlphaSame asBackgroundImageexcept only the alpha channel is used.
  • FillPaintThis keyword represents the value of thefillproperty on the grob being filtered. TheFillPaintimage has conceptually infinite extent. Frequently this image is opaque everywhere, but it might not be if the "paint" itself has alpha, as in the case of a gradient or pattern which itself includes transparent or semi-transparent parts.
  • StrokePaintThis keyword represents the value of thecolproperty on the grob being filtered. TheStrokePaintimage has conceptually infinite extent. Frequently this image is opaque everywhere, but it might not be if the "paint" itself has alpha, as in the case of a gradient or pattern which itself includes transparent or semi-transparent parts.
  • The result of any filter effect operation. This is the name that has been given to theresultargument of a filter primitive.

References

http://www.w3.org/TR/SVG/filters.html#FilterPrimitiveInAttribute